/*
 * Created by JFormDesigner on Sat Nov 02 15:23:10 CST 2024
 */

package com.dhx.view;

import com.dhx.view.GYS.AddGYSFrm;
import com.dhx.view.GYS.ManagerGYSFrm;
import com.dhx.view.RuKu.AddRuKuFrm;
import com.dhx.view.RuKu.QueryRuKuFrm;
import com.dhx.view.ShangPin.AddShangPinFrm;
import com.dhx.view.ShangPin.ManageShangPinFrm;
import com.dhx.view.kehu.AddKeHuFrm;
import com.dhx.view.kehu.ManagerKeHuFrm;

import java.awt.event.*;
import javax.swing.*;
import javax.swing.GroupLayout;

/**
 * @author 25188
 */
public class MainFrm extends JFrame {
    public MainFrm() {
        initComponents();
    }

    private void queryKCbtn(ActionEvent e) {
        // TODO add your code here  显示库存页面
        KuCunFrm kuCunFrm = new KuCunFrm();
        kuCunFrm.setVisible(true);
    }

    private void addGYSbtn(ActionEvent e) {
        // TODO add your code here
        AddGYSFrm addGYSFrm = new AddGYSFrm();
        addGYSFrm.setVisible(true);
    }

    private void manageGYSbtn(ActionEvent e) {
        // TODO add your code here
        ManagerGYSFrm managerGYSFrm = new ManagerGYSFrm();
        managerGYSFrm.setVisible(true);
    }

    private void addKHbtn(ActionEvent e) {
        // TODO add your code here
        AddKeHuFrm addKeHuFrm = new AddKeHuFrm();
        addKeHuFrm.setVisible(true);
    }

    private void manageKHbtn(ActionEvent e) {
        // TODO add your code here
        ManagerKeHuFrm managerKeHuFrm = new ManagerKeHuFrm();
        managerKeHuFrm.setVisible(true);
    }

    private void addSPbtn(ActionEvent e) {
        // TODO add your code here
        AddShangPinFrm addShangPinFrm = new AddShangPinFrm();
        addShangPinFrm.setVisible(true);
    }

    private void manageSPbtn(ActionEvent e) {
        // TODO add your code here
        ManageShangPinFrm manageShangPinFrm = new ManageShangPinFrm();
        manageShangPinFrm.setVisible(true);
    }

    private void addRKbtn(ActionEvent e) {
        // TODO add your code here
        AddRuKuFrm addRuKuFrm = new AddRuKuFrm();
        addRuKuFrm.setVisible(true);
    }

    private void queryRKbtn(ActionEvent e) {
        // TODO add your code here
        QueryRuKuFrm queryRuKuFrm = new QueryRuKuFrm();
        queryRuKuFrm.setVisible(true);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        queryKCbtn = new JButton();
        addGYSbtn = new JButton();
        manageGYSbtn = new JButton();
        addKHbtn = new JButton();
        manageKHbtn = new JButton();
        addSPbtn = new JButton();
        manageSPbtn = new JButton();
        addRKbtn = new JButton();
        queryRKbtn = new JButton();

        //======== this ========
        setTitle("\u4e3b\u754c\u9762");
        var contentPane = getContentPane();

        //---- queryKCbtn ----
        queryKCbtn.setText("\u67e5\u8be2\u5e93\u5b58");
        queryKCbtn.addActionListener(e -> queryKCbtn(e));

        //---- addGYSbtn ----
        addGYSbtn.setText("\u6dfb\u52a0\u4f9b\u5e94\u5546");
        addGYSbtn.addActionListener(e -> addGYSbtn(e));

        //---- manageGYSbtn ----
        manageGYSbtn.setText("\u4f9b\u5e94\u5546\u7ba1\u7406");
        manageGYSbtn.addActionListener(e -> manageGYSbtn(e));

        //---- addKHbtn ----
        addKHbtn.setText("\u6dfb\u52a0\u5ba2\u6237");
        addKHbtn.addActionListener(e -> addKHbtn(e));

        //---- manageKHbtn ----
        manageKHbtn.setText("\u5ba2\u6237\u7ba1\u7406");
        manageKHbtn.addActionListener(e -> manageKHbtn(e));

        //---- addSPbtn ----
        addSPbtn.setText("\u6dfb\u52a0\u5546\u54c1");
        addSPbtn.addActionListener(e -> addSPbtn(e));

        //---- manageSPbtn ----
        manageSPbtn.setText("\u5546\u54c1\u7ba1\u7406");
        manageSPbtn.addActionListener(e -> manageSPbtn(e));

        //---- addRKbtn ----
        addRKbtn.setText("\u6dfb\u52a0\u5165\u5e93");
        addRKbtn.addActionListener(e -> addRKbtn(e));

        //---- queryRKbtn ----
        queryRKbtn.setText("\u67e5\u8be2\u5165\u5e93");
        queryRKbtn.addActionListener(e -> queryRKbtn(e));

        GroupLayout contentPaneLayout = new GroupLayout(contentPane);
        contentPane.setLayout(contentPaneLayout);
        contentPaneLayout.setHorizontalGroup(
            contentPaneLayout.createParallelGroup()
                .addGroup(contentPaneLayout.createSequentialGroup()
                    .addGap(85, 85, 85)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                        .addComponent(addKHbtn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(addRKbtn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(addSPbtn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(queryKCbtn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(addGYSbtn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGap(60, 60, 60)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                        .addComponent(manageGYSbtn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(manageSPbtn, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(queryRKbtn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(manageKHbtn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap(405, Short.MAX_VALUE))
        );
        contentPaneLayout.setVerticalGroup(
            contentPaneLayout.createParallelGroup()
                .addGroup(contentPaneLayout.createSequentialGroup()
                    .addGap(55, 55, 55)
                    .addComponent(queryKCbtn)
                    .addGap(27, 27, 27)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(addGYSbtn)
                        .addComponent(manageGYSbtn))
                    .addGap(22, 22, 22)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(addKHbtn)
                        .addComponent(manageKHbtn))
                    .addGap(18, 18, 18)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(addSPbtn)
                        .addComponent(manageSPbtn))
                    .addGap(18, 18, 18)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(addRKbtn)
                        .addComponent(queryRKbtn))
                    .addContainerGap(139, Short.MAX_VALUE))
        );
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JButton queryKCbtn;
    private JButton addGYSbtn;
    private JButton manageGYSbtn;
    private JButton addKHbtn;
    private JButton manageKHbtn;
    private JButton addSPbtn;
    private JButton manageSPbtn;
    private JButton addRKbtn;
    private JButton queryRKbtn;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
